<% if @locations.length > 0 %>
<h1><font color="white">Listing locations</font></h1>
<div id="list">

<table class="wide-table"> 
  <tr>
    <th>Username</th>
    <th>Phonenumber</th>
    <th>Latitude</th>
    <th>Longitude</th>
    <th>Date and Time</th>
    <th>Commtype</th>
	<th></th>
	<th></th>
  </tr>

<%= render(:partial => "location", :collection => @locations ) %>
<%
=begin %>
<% @locations.each do |location| %>

  <tr>
    <td><%=h location.username %></td>
    <td><%=h location.phonenumber %></td>
    <td><%=h location.latitude %></td>
    <td><%=h location.longitude %></td>
    <td><%=h location.time %></td>
    <td><%=h location.commType %></td>
    <td><%= link_to 'Show', location %></td>
    <td><%= link_to 'Edit', edit_location_path(location) %></td>
    <td><%= link_to 'Destroy', location, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
<%
=end %>
</table>
</div>
<br />
<% end %>
